In an undulator used to extract synchrotron radiation from an electron beam in a synchrotron radiation facility, there is provided a pair of magnet arrays disposed parallel to and opposite each other to produce a periodic magnetic field, and by undulating electrons that travel between the pair of magnet arrays at a speed close to that of light, intense synchrotron radiation is generated. The periodic magnetic field can be produced with permanent magnets or electromagnets. To obtain synchrotron radiation with a short wavelength in the X-ray region in particular, however, the magnetic field needs to have a period of the order of several centimeters or less, and with electromagnets, it is impossible to produce a magnetic field with sufficient intensity. For this reason, most undulators adopt permanent magnets.
FIG. 22 shows an example of an undulator magnet array used in a conventional undulator. In FIG. 22, the undulator magnet array 901 has a first magnet array 910 and a second magnet array 920. The magnet arrays 910 and 920 each contain four magnets 930 per period λu, and the magnetization direction (indicated by arrows inside the magnets 930) of the magnets 930 contained in each magnet array changes, in the plane through the magnet arrays 910 and 920, by 90° from one magnet to the next (Patent Document 1 and Non-Patent Document 1). Such an undulator magnet array 901 is called, for example, a Halbach magnet array. The electrons traveling between the magnet arrays 910 and 920 at a speed close to that of light are undulated by the action of the periodic magnetic field produced by the magnet arrays 910 and 920 to emit light (synchrotron radiation) with a wavelength λ given by the following equation.λ(λu,B,E)=130λ[1+(93.37λuB)2/2]/E2 
In the above formula, λ is the wavelength of the synchrotron radiation in nanometers (called the fundamental wavelength), λu is the spatial period of the magnet arrays in meters, B is the amplitude of the magnetic field in tesla, and E is the energy of electrons in gigaelectronvolts.
In a synchrotron radiation facility, the energy of electrons is fixed, and the spatial period is determined during the designing of an undulator; thus, to allow selection of a particular wavelength during the operation of the synchrotron radiation facility, the magnetic field amplitude has to be adjustable. The magnetic field amplitude can be adjusted easily within a certain range by varying the interval, called gap, between the magnet arrays 910 and 920.